package com.cbgolf.oa.presenter;

import com.cbgolf.oa.contract.IOrderDetailsContract.IOrderDetailsModel;
import com.cbgolf.oa.contract.IOrderDetailsContract.IOrderDetailsPresenter;
import com.cbgolf.oa.contract.IOrderDetailsContract.IOrderDetailsView;
import com.cbgolf.oa.model.OrderDetailsModelImp;

/**
 * 订单详情presenter imp
 * @author lq
 * @date 2018/4/12
 */

public class OrderDetailsPresenterImp implements IOrderDetailsPresenter {

  /**
   * view
   */
  private IOrderDetailsView view;
  /**
   * model
   */
  private IOrderDetailsModel model;

  public OrderDetailsPresenterImp(IOrderDetailsView view) {
    this.view = view;
    model = new OrderDetailsModelImp();
  }

  @Override
  public void requestData(String orderId, boolean isMatch) {
    view.showProgress();
    model.requestData(orderId, isMatch);
  }

  @Override
  public void doSubmit(boolean isHotel, String orderId) {
    view.showProgress();
    model.doSubmit(isHotel, orderId);
  }

  @Override
  public void doCancel(boolean isHotel, String orderId) {
    view.showProgress();
    model.doCancel(isHotel, orderId);
  }
}
